package com.itheima.stock.mapper;


import com.itheima.stock.pojo.SysUser;
import com.itheima.stock.vo.req.ConditionQueryUserReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author HearTheSong
* @description 针对表【sys_user(用户表)】的数据库操作Mapper
* @createDate 2022-03-13 17:42:28
* @Entity com.itheima.stock.pojo.SysUser
*/
@Mapper
public interface SysUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    // 登录时 根据username查询user信息
    SysUser findByUserName(String username);
    /*
        登录时 根据用户名查询 用户和权限信息
     */
    SysUser getUserPermissionInfo(@Param("username") String username);
    /*
        功能描述：多条件综合查询用户分页信息，条件包含：分页信息 用户创建日期范围
     */
    List<SysUser> conditionsQueryUser(@Param("req") ConditionQueryUserReq req);
    /*
        功能描述：添加用户信息
     */
    void insertUser(@Param("addUser") SysUser adduser);
}
